<template>
	<!--用户指南页面-->
	<view class="community">
		<!-- <view class="head_bg" style="position: relative;"></view> -->
		<view v-if="list.length" class="big_box" style="top: 0;margin-top: 10rpx;">
			<view class="guide_box">
				<view class="" v-for="(info,index) in list" :key="index">
					<view class="guide_li" @tap="sds(index)">
						<image class="guide_li_icon" v-show="!info.showIndex" src="../../../common/img/right_jiantou.png" mode=""></image>
						<image class="guide_li_icon" v-show="info.showIndex" src="../../../common/img/bottom_jiantou.png" mode=""></image>
						{{info.title}}
					</view>
					<view class="guide_show" v-show="info.showIndex">
						<rich-text :nodes="info.content" class="notice_p"></rich-text>
					</view>
				</view>
			</view>
		</view>
		<view v-if="list.length==0" class="margin-top-lg text-center">
			<image src='../../../common/img/no_data.png' style="width:275rpx;height:312rpx;"></image>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:[],	
			}
		},
		onLoad() {
			this.getGuide();
		},
		methods: {
			getGuide(){
				this.http.tokenreq({
					url: 'operator/v1/getguide',
				}).then((res) => {
					let e=res.data;
					console.log(e)
					if(e.code==0 && e.success){
					  let list = e.rows;
					  list.forEach(item => {
					  	item.showIndex = false;
					  });
					  this.list = list;
					}
				})
			},
			sds(index){
				this.list[index].showIndex=!this.list[index].showIndex
			}
		}
	}
</script>
<style>
	page{
		background-color: #FFFFFF;
	}
	.guide_li{
		height:100rpx;
	}
</style>
